from CaseAW.GridBase import winAppBase


class tree_base(winAppBase):
    def get_tree_items(self):
        f_ele=self.driver.find_element_by_name("模型树及元素列表")
        f_ele=f_ele.find_element_by_class_name("ProTreeView")
        tree_list=f_ele.find_element_by_xpath("//*")
        def demo(ele):
            return ele.get_attribute("Name")
        tree_name_list=list(map(demo,tree_list))
        return tree_name_list
